<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <?php $this->display('inc_skin.php',0,'首页'); ?>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <script type="text/javascript" src="/skin/js/jquery.min.js"></script>
   <link rel="stylesheet" type="text/css" href="/skin/css/style.css">
   <link href="/skin/main/skins.css" rel="stylesheet" type="text/css" />
   <link type="text/css" rel="stylesheet" href="/skin/js/jqueryui/skin/smoothness/jquery-ui-1.8.21.custom.css">
<script type='application/javascript' src='/skin/js/fastclick.js'></script>
<script type="text/javascript" src="/skin/main/game.js"></script>
<script type="text/javascript" src="/skin/main/function.js"></script>
<script type="text/javascript" src="/skin/js/jquery.simplemodal.src.js"></script>
<script type="text/javascript" src="/skin/js/jquery.messager.js"></script>
<style type="text/css">
  .lot-number-left{
    padding:30px 0 0 10px !important;
  }
  .lotinnerbox{
    width: 100%;
    overflow: hidden;
  }
  .mains{
    position: fixed;
    top:50px;
    left: 0;
    z-index: 10000;
  }
  .main{
    margin-top: 80px;
  }
  .box{
    margin-bottom: 60px;
  }
  .ui-dialog{
    display: none;
  }
</style>
</head>
<body>
<div class="header">
    <div class="main">
        <a href="/index.php" ><span class="left"></span></a>
       <div class="mainbox">
       <div class="plays">
        <span class="play">玩法</span>
          <!-- <div class="select-play"><span>选择玩法<i class="bett-attr"></i></span></div> -->
          <div class="select-play"><span><span class="gp1">大小</span><span class="gp2"></span><i class="bett-attr"></i></span></div>
       </div>
       </div>
    </div>
</div>
       <div class="box" style="margin-top: 120px">
        <div class="bigBox">
          <div class="box_txt"><span class="box_choose chose_f">大小</span></div>
          <ul class="boxUl" style="margin-top: 30px">
            <li><button class="colorBg" name="" value="1" readonly="readonly">大小</button></li>
            <li><button name="" value="2" readonly="readonly">单双</button></li>  
            <li><button name="" value="3" readonly="readonly">龙虎</button></li>
            <li><button name="" value="4" readonly="readonly">直选</button></li>
          </ul>

          <div class="box_txt"></div>
          <div class="showBox" style="margin-top: 30px">
            <!-- 大小的选择 -->
            <div class="lotNumberBox">
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="1">万位</div></div>
                <div class="innerBox lot-number-right" style="display: block;">
                  <div><button name="" value="110" readonly="readonly">大</button></div>
                  <div><button name="" value="120" readonly="readonly">小</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="2">千位</div></div>
                <div class="innerBox lot-number-right" style="display: block;">
                  <div><button name="" value="111" readonly="readonly">大</button></div>
                  <div><button name="" value="121" readonly="readonly">小</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="3">百位</div></div>
                <div class="innerBox lot-number-right" style="display: block;">
                  <div><button name="" value="112" readonly="readonly">大</button></div>
                  <div><button name="" value="122" readonly="readonly">小</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="3">十位</div></div>
                <div class="innerBox lot-number-right" style="display: block;">
                  <div><button name="" value="113" readonly="readonly">大</button></div>
                  <div><button name="" value="123" readonly="readonly">小</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="4">个位</div></div>
                <div class="innerBox lot-number-right" style="display: block;">
                  <div><button name="" value="114" readonly="readonly">大</button></div>
                  <div><button name="" value="124" readonly="readonly">小</button></div>
                </div>
              </div>                            
            </div>
            <!-- 单双的选择 -->
            <div class="lotNumberBox" style="display: none;">
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="1">万位</div></div>
                <div class="innerBox lot-number-right">
                  <div><button  name="" value="230" readonly="readonly">单</button></div>
                  <div><button name="" value="240" readonly="readonly">双</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="2">千位</div></div>
                <div class="innerBox lot-number-right">
                  <div><button  name="" value="231" readonly="readonly">单</button></div>
                  <div><button name="" value="241" readonly="readonly">双</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="3">百位</div></div>
                <div class="innerBox lot-number-right">
                  <div><button  name="" value="232" readonly="readonly">单</button></div>
                  <div><button name="" value="242" readonly="readonly">双</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="4">十位</div></div>
                <div class="innerBox lot-number-right">
                  <div><button  name="" value="233" readonly="readonly">单</button></div>
                  <div><button name="" value="243" readonly="readonly">双</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="5">个位</div></div>
                <div class="innerBox lot-number-right">
                  <div><button  name="" value="234" readonly="readonly">单</button></div>
                  <div><button name="" value="244" readonly="readonly">双</button></div>
                </div>
              </div>
            </div>
            <!-- 龙虎的选择 -->
            <div class="lotNumberBox" style="display: none;">
              <div class="lotinnerbox">
                <div class="lot-number-left"><div class="title" id="1">龙虎</div></div>
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="350" readonly="readonly">万位</button></div>
                  <div class="special"><button  name="" value="380" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="360" readonly="readonly">千位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="351" readonly="readonly">万位</button></div>
                  <div class="special"><button  name="" value="381" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="361" readonly="readonly">百位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="352" readonly="readonly">万位</button></div>
                  <div class="special"><button  name="" value="382" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="362" readonly="readonly">十位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="353" readonly="readonly">万位</button></div>
                  <div class="special"><button  name="" value="383" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="363" readonly="readonly">个位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="354" readonly="readonly">千位</button></div>
                  <div class="special"><button  name="" value="384" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="364" readonly="readonly">百位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="355" readonly="readonly">千位</button></div>
                  <div class="special"><button  name="" value="385" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="365" readonly="readonly">十位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="356" readonly="readonly">千位</button></div>
                  <div class="special"><button  name="" value="386" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="366" readonly="readonly">个位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="357" readonly="readonly">百位</button></div>
                  <div class="special"><button  name="" value="387" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="367" readonly="readonly">十位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="358" readonly="readonly">百位</button></div>
                  <div class="special"><button  name="" value="388" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="368" readonly="readonly">个位</button></div>
                </div>
              </div>
              <div class="lotinnerbox">
                <div class="innerBox lot-number-right">
                  <div class="special"><button  name="" value="359" readonly="readonly">十位</button></div>
                  <div class="special"><button  name="" value="389" readonly="readonly">和</button></div>
                  <div class="special"><button name="" value="369" readonly="readonly">个位</button></div>
                </div>
              </div>
            </div>
            <!-- 直选 -->
            <div class="lotNumberBox" style="display: none;">
              <div class="lotinnerbox" style="border-bottom: 1px solid #ccc">
                <div class="lot-number-left" style="padding:21px 0 0 10px !important;"><div class="title" id="1">万位</div></div>
                <div class="innerBoxs innerBox lot-number-right">
                  <div class="moreC">
                    <div class="chosediv chosediv1"  id="0"><span>全</span></div>
                    <div class="chosediv chosediv2"  id="1"><span>大</span></div>
                    <div class="chosediv chosediv3"  id="2"><span>小</span></div>
                    <div class="chosediv chosediv4"  id="3"><span>奇</span></div>
                    <div class="chosediv chosediv5"  id="4"><span>偶</span></div>
                    <div class="chosediv chosediv6"  id="5"><span>清</span></div>
                  </div>
                  <div><button  name="" value="4700" readonly="readonly">0</button></div>
                  <div><button name="" value="4701" readonly="readonly">1</button></div>
                  <div><button name="" value="4702" readonly="readonly">2</button></div>
                  <div><button name="" value="4703" readonly="readonly">3</button></div>
                  <div><button name="" value="4704" readonly="readonly">4</button></div>
                  <div><button name="" value="4705" readonly="readonly">5</button></div>
                  <div><button name="" value="4706" readonly="readonly">6</button></div>
                  <div><button name="" value="4707" readonly="readonly">7</button></div>
                  <div><button name="" value="4708" readonly="readonly">8</button></div>
                  <div><button name="" value="4709" readonly="readonly">9</button></div>
                </div> 
            </div>                                   
              <div class="lotinnerbox" style="border-bottom: 1px solid #ccc">
                <div class="lot-number-left" style="padding:21px 0 0 10px !important;"><div class="title" id="2">千位</div></div>
                <div class="innerBoxs innerBox lot-number-right">
                  <div class="moreC">
                    <div class="chosediv chosediv1"  id="0"><span>全</span></div>
                    <div class="chosediv chosediv2"  id="1"><span>大</span></div>
                    <div class="chosediv chosediv3"  id="2"><span>小</span></div>
                    <div class="chosediv chosediv4"  id="3"><span>奇</span></div>
                    <div class="chosediv chosediv5"  id="4"><span>偶</span></div>
                    <div class="chosediv chosediv6"  id="5"><span>清</span></div>
                  </div>
                  <div><button  name="" value="4710" readonly="readonly">0</button></div>
                  <div><button name="" value="4711" readonly="readonly">1</button></div>
                  <div><button name="" value="4712" readonly="readonly">2</button></div>
                  <div><button name="" value="4713" readonly="readonly">3</button></div>
                  <div><button name="" value="4714" readonly="readonly">4</button></div>
                  <div><button name="" value="4715" readonly="readonly">5</button></div>
                  <div><button name="" value="4716" readonly="readonly">6</button></div>
                  <div><button name="" value="4717" readonly="readonly">7</button></div>
                  <div><button name="" value="4718" readonly="readonly">8</button></div>
                  <div><button name="" value="4719" readonly="readonly">9</button></div>
                </div> 
            </div>                                   
              <div class="lotinnerbox" style="border-bottom: 1px solid #ccc">
                <div class="lot-number-left" style="padding:21px 0 0 10px !important;"><div class="title" id="3">百位</div></div>
                <div class="innerBoxs innerBox lot-number-right">
                  <div class="moreC">
                    <div class="chosediv chosediv1"  id="0"><span>全</span></div>
                    <div class="chosediv chosediv2"  id="1"><span>大</span></div>
                    <div class="chosediv chosediv3"  id="2"><span>小</span></div>
                    <div class="chosediv chosediv4"  id="3"><span>奇</span></div>
                    <div class="chosediv chosediv5"  id="4"><span>偶</span></div>
                    <div class="chosediv chosediv6"  id="5"><span>清</span></div>
                  </div>
                  <div><button  name="" value="4720" readonly="readonly">0</button></div>
                  <div><button name="" value="4721" readonly="readonly">1</button></div>
                  <div><button name="" value="4722" readonly="readonly">2</button></div>
                  <div><button name="" value="4723" readonly="readonly">3</button></div>
                  <div><button name="" value="4724" readonly="readonly">4</button></div>
                  <div><button name="" value="4725" readonly="readonly">5</button></div>
                  <div><button name="" value="4726" readonly="readonly">6</button></div>
                  <div><button name="" value="4727" readonly="readonly">7</button></div>
                  <div><button name="" value="4728" readonly="readonly">8</button></div>
                  <div><button name="" value="4729" readonly="readonly">9</button></div>
                </div> 
            </div>                                   
              <div class="lotinnerbox" style="border-bottom: 1px solid #ccc">
                <div class="lot-number-left" style="padding:21px 0 0 10px !important;"><div class="title" id="4">十位</div></div>
                <div class="innerBoxs innerBox lot-number-right">
                  <div class="moreC">
                    <div class="chosediv chosediv1"  id="0"><span>全</span></div>
                    <div class="chosediv chosediv2"  id="1"><span>大</span></div>
                    <div class="chosediv chosediv3"  id="2"><span>小</span></div>
                    <div class="chosediv chosediv4"  id="3"><span>奇</span></div>
                    <div class="chosediv chosediv5"  id="4"><span>偶</span></div>
                    <div class="chosediv chosediv6"  id="5"><span>清</span></div>
                  </div>
                  <div><button  name="" value="4730" readonly="readonly">0</button></div>
                  <div><button name="" value="4731" readonly="readonly">1</button></div>
                  <div><button name="" value="4732" readonly="readonly">2</button></div>
                  <div><button name="" value="4733" readonly="readonly">3</button></div>
                  <div><button name="" value="4734" readonly="readonly">4</button></div>
                  <div><button name="" value="4735" readonly="readonly">5</button></div>
                  <div><button name="" value="4736" readonly="readonly">6</button></div>
                  <div><button name="" value="4737" readonly="readonly">7</button></div>
                  <div><button name="" value="4738" readonly="readonly">8</button></div>
                  <div><button name="" value="4739" readonly="readonly">9</button></div>
                </div> 
            </div>                                   
              <div class="lotinnerbox" style="border-bottom: 1px solid #ccc">
                <div class="lot-number-left" style="padding:21px 0 0 10px !important;"><div class="title" id="5">个位</div></div>
                <div class="innerBoxs innerBox lot-number-right">
                  <div class="moreC">
                    <div class="chosediv chosediv1"  id="0"><span>全</span></div>
                    <div class="chosediv chosediv2"  id="1"><span>大</span></div>
                    <div class="chosediv chosediv3"  id="2"><span>小</span></div>
                    <div class="chosediv chosediv4"  id="3"><span>奇</span></div>
                    <div class="chosediv chosediv5"  id="4"><span>偶</span></div>
                    <div class="chosediv chosediv6"  id="5"><span>清</span></div>
                  </div>
                  <div><button  name="" value="4740" readonly="readonly">0</button></div>
                  <div><button name="" value="4741" readonly="readonly">1</button></div>
                  <div><button name="" value="4742" readonly="readonly">2</button></div>
                  <div><button name="" value="4743" readonly="readonly">3</button></div>
                  <div><button name="" value="4744" readonly="readonly">4</button></div>
                  <div><button name="" value="4745" readonly="readonly">5</button></div>
                  <div><button name="" value="4746" readonly="readonly">6</button></div>
                  <div><button name="" value="4747" readonly="readonly">7</button></div>
                  <div><button name="" value="4748" readonly="readonly">8</button></div>
                  <div><button name="" value="4749" readonly="readonly">9</button></div>
                </div> 
            </div>                                   
          </div> 
          <!-- 直选 end -->
        </div>
       </div>
</div>
   <?php
          date_default_timezone_set('PRC');
          $timeinfo = time();
          $datassc = $this->getRows("select * from {$this->prename}datassc order by id desc limit 2");
          // var_dump( $msg[1]['ball2']);
          $msg = array();
          if($datassc){
            foreach ($datassc as $key => $value) {
               $msg[$key]['qishu'] = $value['qishu'];
               $msg[$key]['time'] = $value['time'];
               $msg[$key]['ball1'] = $value['ball1'];
               $msg[$key]['ball2'] = $value['ball2'];
               $msg[$key]['ball3'] = $value['ball3'];
               $msg[$key]['ball4'] = $value['ball4'];
               $msg[$key]['ball5'] = $value['ball5'];
            }
            $feng = strtotime($msg[0]['time'])-180;
            $fengtime = date("Y/m/d H:i:s",$feng);

          }else{
              $msg[1]['qishu'] = "";
              $msg[0]['qishu'] = 1;
          }
  ?>
<div class="mains">
  <div class="mains-left">
    <div class="fentext"><span><?php echo $msg[1]['qishu'];?></span>期</div>
    <?php
    if($msg[1]['ball1'] >= 0){
      ?>
    <div class="ball" style="display: none" id="ball">
      <div id="balls">
       <span style="color:white;padding:3px 6px;border-radius: 5px;background: red;"><?php echo $msg[1]['ball1'];?></span>&nbsp;
        <span style="color:white;padding:3px 6px;border-radius: 5px;background: red;"><?php echo $msg[1]['ball2'];?></span>&nbsp;
        <span style="color:white;padding:3px 6px;border-radius: 5px;background: red;"><?php echo $msg[1]['ball3'];?></span>&nbsp;
        <span style="color:white;padding:3px 6px;border-radius: 5px;background: red;"><?php echo $msg[1]['ball4'];?></span>&nbsp;
        <span style="color:white;padding:3px 6px;border-radius: 5px;background: red;"><?php echo $msg[1]['ball5'];?></span>
         </div>
        </div>
    <div class="kais" style="font-size: 15px;">等待开奖</div>
    <?php
    }
    ?> 
  </div>
  <div class="mains-right">
    
    <div class="fentext">距<span id="qishu"><?php echo $msg[0]['qishu'];?></span>期截止</div>
    <div> 

   </div>
    <span style="display:none"><span id="fp_m">00分</span><span id="fp_s">00秒</span></span>  
    <!--   开奖 <span style="border:1px solid #b18b8b;padding:0 4px;" ><span id="kj_m">00分</span><span id="kj_s">00秒</span></span> -->
      <div class="kai" style="margin-top: -3px;">
        <span id="timeh1">0</span>
        <span id="timeh2">0</span>
        <span class="time-kong"></span>
<!--         <span id="times">:</span> -->
        <span id="time1">0</span>
        <span id="time2">0</span>
        <!-- <span id="times">:</span> -->
        <span class="time-kong"></span>
        <span id="time3">0</span>
        <span id="time4">0</span>
      </div> 
</div>
  </div>
</div>
<div>
</div>
<script type="text/javascript">
var game={
  type:20,
  played:"93",
  groupId:26},
  user="ceshi",
  aflag=false;
</script>
<!-- 请选择投注号码弹窗 start -->
<div id="ui-wxts" class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-wanjinDialog" style=" z-index: 1001; outline: 0px; height: auto; width: 300px; top: 239.5px; left: 34px;"><div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"><span class="ui-dialog-title" id="ui-dialog-title-wanjinDialog">温馨提示</span><a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"><span class="ui-icon ui-icon-closethick" onclick="closebtn(this)">close</span></a></div><div id="wanjinDialog" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0" style="width: auto; min-height: 69.28px; height: auto;"><span class="ui-wjicon-alert"></span><b>请选择投注号码</b></div><div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><div class="ui-dialog-buttonset"><button onclick="closebtn(this)" type="button">确定</button></div></div></div>
<!-- 请选择投注号码弹窗 end -->
<!-- 期投注已截止弹窗 start -->
<div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-wanjinDialog" style="z-index: 1006; outline: 0px; height: auto; width: 300px; top: 220px; left: 34px;"><div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"><span class="ui-dialog-title" id="ui-dialog-title-wanjinDialog">温馨提示</span><a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"><span class="ui-icon ui-icon-closethick"  onclick="closebtn(this)">close</span></a></div><div id="wanjinDialog" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0" style="width: auto; min-height: 109.28px; height: auto;"><span class="ui-wjicon-confirm"></span>第&nbsp;688687&nbsp;期投注已截止!<br><br>清空预投注内容请点击"确定"，不刷新页面请点击"取消"。</div><div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><div class="ui-dialog-buttonset"><button type="button">确定</button><button type="button">取消</button></div></div></div>
<!-- 期投注已截止弹窗 end -->
<!-- 计算倍率弹窗 start -->
<div id="ui-computed" class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-touzhuBox" style=" z-index: 1002; outline: 0px; height: auto; width: 300px; top: 202px;position: fixed; left: 34px;"><div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"><span class="ui-dialog-title" id="ui-dialog-title-touzhuBox">注单设定</span><a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"><span class="ui-icon ui-icon-closethick"  onclick="closebtn(this)">close</span></a></div><div id="touzhuBox" style="width: auto; min-height: 117.28px; height: auto;" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0">
    <!--投注区域开始-->
      <div class="num-table" id="game-dom" style="height:auto;">
        <div class="fandian">
          <div class="fandian-k" style="visibility: visible;display: none;"> <span class="spn8">奖金/返点：<span id="fandian-value" style="float:right;" class="fdmoney">19.54/0.0%</span></span>
        <div class="fandian-box">
          <input type="button" class="min" value="-" step="-0.1">
          <div id="slider" class="slider ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" value="" data-bet-count="100000" data-bet-zj-amount="500000" max="12.7" game-fan-dian="13.0" fan-dian="12.7" game-fan-dian-bdw="6.0" fan-dian-bdw="0.0" min="0" step="0.1" slidecallback="gameSetFanDian"><a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 0%;"></a></div>
          <input type="button" class="max" value="+" step="0.1">
        </div>
               </div>
              <div class="danwei"> <span class="spn8">模式：</span>
            <label class="checked2222 zhuMon" id="0">元
              <input type="radio" value="2.00" data-max-fan-dian="13" name="danwei">
            </label>
              <label class="zhuMon" id="1" style="border-left:0;border-right:0;">角
              <input type="radio" value="0.20" data-max-fan-dian="13" name="danwei">
            </label>
                        <label class="zhuMon" id="2">分
              <input type="radio" value="0.02" data-max-fan-dian="13" name="danwei" checked="">
            </label>
                      </div>
          <div class="beishu"> <span class="spn8">倍数：</span>
            <input type="button" onclick="reduceM()" class="surbeishu" value="-">
            <input id="beishu" type="text" value="1" class="txt">
            <input type="button" onclick="addM()" class="addbeishu" value="+">
          </div>
          <div class="tztj-btn" style="display:none;">
            <div class="tztj-hover" onclick="gameActionAddCode()"></div>
          </div>
        </div>
      </div>
    <!--投注区域结束-->
    </div><div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><div class="ui-dialog-buttonset"><button type="button" class="btnSure">确定</button><button type="button" class="quxiao" onclick="closebtn(this)">取消</button></div></div></div>
    <!-- 计算倍率弹窗 end -->
 <?php //$this->display('index/inc_game_played.php'); ?>
       <div id="touzhuBox" style="display:none;">
    <!--投注区域开始-->
      <div class="num-table" id="game-dom" style="height:auto;">
        <div class="fandian">
          <div class="fandian-k"> <span class="spn8">奖金/返点：<span id="fandian-value" style="float:right;" class="fdmoney">
            <?=$maxPl?>
             /0%</span></span>
        <div class="fandian-box">
          <input type="button" class="min" value="-" step="-0.1"/>
          <div id="slider" class="slider" value="<?=$this->ifs($_COOKIE['fanDian'], 0)?>" data-bet-count="<?=$this->settings['betMaxCount']?>" data-bet-zj-amount="<?=$this->settings['betMaxZjAmount']?>" max="<?=$this->user['fanDian']?>" game-fan-dian="<?=$this->settings['fanDianMax']?>" fan-dian="<?=$this->user['fanDian']?>" game-fan-dian-bdw="<?=$this->settings['fanDianBdwMax']?>" fan-dian-bdw="<?=$this->user['fanDianBdw']?>" min="0" step="0.1" slideCallBack="gameSetFanDian"></div>
          <input type="button" class="max" value="+" step="0.1"/>
        </div>
             </div>
              <div class="danwei"> <span class="spn8">模式：</span>
            <label class="checked22">元
              <input type="radio" value="2.00" data-max-fan-dian="<?=$this->settings['betModeMaxFanDian0']?>" name="danwei" <?=$this->iff($mode=='2.00','checked')?> />
            </label>
              <label style="border-left:0;border-right:0;">角
              <input type="radio" value="0.20" data-max-fan-dian="<?=$this->settings['betModeMaxFanDian1']?>" name="danwei" <?=$this->iff($mode=='0.20','checked')?> />
            </label>
            <?php if($this->settings['fenmosi']==1){
              ?>
            <label>分
              <input type="radio" value="0.02" data-max-fan-dian="<?=$this->settings['betModeMaxFanDian2']?>" name="danwei" <?=$this->iff($mode=='0.02','checked')?> />
            </label>
            <?php
            }
            ?>
          </div>
          <div class="beishu"> <span class="spn8">倍数：</span>
            <input type="button" class="surbeishu" value="-"/>
            <input id="beishu" type="text" value="<?=$this->ifs($_COOKIE['beishu'],1)?>" class="txt"/>
            <input type="button" class="addbeishu" value="+"/>
          </div>
          <div class="tztj-btn" style="display:none;">
            <div class="tztj-hover" onclick="gameActionAddCode()"></div>
          </div>
        </div>
      </div>
    <!--投注区域结束-->
    </div>
<!-- <div class="footer"> 
  <button class="btn">下注</button>
  <button class="btn-add" onclick="sendTouzhu()">确定</button>
  <button class="btn-none" onclick="clearCode()">清空</button>
</div> -->
<div class="bett-foot">
  <div class="beet-foot-txt">
    <!--<div class="beet-note">共8元</div>-->
    <p style="font-size: 14px;padding-left: 20px;height: 45px;line-height: 45px;">共&nbsp;<span id="bet_sel_count" style="color:#fdaf53;">0</span>&nbsp;注&nbsp;&nbsp;<span id="bet_sel_money" class="red" style="color:#fdaf53;">0</span>&nbsp;元</p>
  </div>
    <button class="btn" id="btn-add" style="background: #f37c2d">确定</button>
    <button class="btn-none" onclick="clearCode()">清空</button>
 </div>   
<script type="text/javascript">
var game={
  type:20,
  played:"93",
  groupId:26},
  user="ceshi",
  aflag=false;
$('#lefts').click(function(){
  window.history.go(-1);
})  
$('.plays').click(function(){
  if($('.box').css('display')=='none'){
    $('.box').show();
  }else{
    $('.box').hide();
  }
  
});
function group(id){
  var msg=$("#group"+id).text(); 
  $(".gp1").html(msg);
 /* $(".box").css({ "display" : 'none' });*/
}
//var time = "1524446301";
var time = <?php echo json_encode($timeinfo);?>;
var NowTime = new Date();
var test = NowTime.getTime();
test = Math.floor(test/1000);
var cha = time-test;

//开奖倒计时
function GetRTime1(){

 // var fp_time = "2018-04-23 09:22:50";
    var fp_time = <?php echo json_encode($msg[0]['time']);?>;
    var EndTime= new Date(fp_time);
    var NowTime = new Date();

    var t =EndTime.getTime() - (NowTime.getTime()+cha*1000);
    var m=0;
    var s=0;
    var h=0;
    if(t>=0){
      h=Math.floor(t/1000/3600);
      m=Math.floor(t/1000/60%60);
      s=Math.floor(t/1000%60);
    }
  if(h<=0){
      if(m<10){
          $("#time1").html(0);
          $("#time2").html(m.toString().split(""));
      }else{
          $("#time1").html(m.toString().split("")[0]);
          $("#time2").html(m.toString().split("")[1]);
      }
      if(s<10){
          $("#time3").html(0);
          $("#time4").html(s.toString().split(""));
      }else{
          $("#time3").html(s.toString().split("")[0]);
          $("#time4").html(s.toString().split("")[1]);
      }
    if(m==0 && s==0 && h==0){ 
      clearInterval(window.kaijiang);
      var qishu = $("#qishu").text();
      $.post('/index.php/user/sscplay',{qishu:qishu},function(data){
      /*  alert(data);*/
          if(data == 200){ 
            window.location.href="/index.php/index/ssc";
          }
      });
           window.location.href="/index.php/index/ssc";
    }
  }else{
    
    $(".kaijiang").html('尚未开启');
    
    
  }
    
}
 var kaijiang = setInterval(GetRTime1,0);
//封盘倒计时
function GetRTime(){

    var NowTime = new Date();

    var fp_time =   <?php echo json_encode($fengtime);?>;
    var EndTime= new Date(fp_time);
    
    var t =EndTime.getTime() - (NowTime.getTime()+cha*1000);
  
    //console.log(EndTime.getTime() NowTime.getTime());
    var m=0;
    var s=0;
    var h=0;
    if(t>=0){
      h=Math.floor(t/1000/3600);
      m=Math.floor(t/1000/60%60);
      s=Math.floor(t/1000%60);
    }
  //console.log(h);
  if(h<=0){
    document.getElementById("fp_m").innerHTML = m + "分"
    document.getElementById("fp_s").innerHTML = s + "秒";
    if(m==0 && s==0 && h==0){
       clearInterval(window.fengpan);
       $.post('/index.php/user/kaijiang',function(data){
         if(data){
            $('.kais').hide();
            $('.ball').show();
         }else{
            $('.kais').hide();
            $('.ball').show();
         }
      });
    }
  }else{
    $(".fengpan").html('尚未开启');
    
  }
    
}
var fengpan = setInterval(GetRTime,0);
  //两秒刷新一次开奖
    setInterval(function () { 
       $("#ball").load("/index.php/index/ssc #balls");
    }, 2000);
/*    $("#qishu").click(function(){
      $("#ball").load("/index.php/index/ssc #balls");
    })*/
//选号存值
var idArray = [];
var btnVal = '';
$('.boxUl>li').each(function(i){
  //初始化 start
     var valNum = $('#bet_sel_count').html();
     valNum = 0;
      $('#bet_sel_count').html(0); 
      $('#bet_sel_money').html(0);
  //初始化 end
  if($('.boxUl>li').eq(i).find('button').hasClass('colorBg')){
    var k = i;
    var elemBtn = $('.lotNumberBox').eq(k).find('.lotinnerbox>.innerBox>div>button');
      elemBtn.click(function(){
         // 判断传值 start
          if($(this).hasClass('colorBg')){
            idArray.pop($(this).val());
          }else{
            btnVal = $(this).val();
            idArray.push(btnVal);
            console.log(idArray)
          }
          // 判断传值 end        
        // 判断下注的数目 start
           // console.log($(this).hasClass('colorBg'))   先是false再是true 
            if(!$(this).hasClass('colorBg')){
               valNum = Number(valNum) + Number(1);
               var moneys = valNum*2;
              $('#bet_sel_count').html(valNum);
              $('#bet_sel_money').html(moneys); 
              return false;            
            }else{
              valNum --;
              var moneys = valNum*2;
              $('#bet_sel_count').html(valNum); 
              $('#bet_sel_money').html(moneys);
              return false;
            }
            // 判断下注的数目 end

      })
  }
  //有bug  待解决***********************************************************************
  $(this).click(function(){ 
   //初始化 start
     var valNum = $('#bet_sel_count').html();
     valNum = 0;
      $('#bet_sel_count').html(0);
      $('#bet_sel_money').html(0);
  //初始化 end
    var index = $(this).index();
      //如果循环点击的元素的下标与当前元素的下标不一致的时，清空数组
      idArray = [];
     var valNum = $('#bet_sel_count').html();
     valNum = 0;
      $('#bet_sel_count').html(0); 
      $('#bet_sel_money').html(0);
    //如果循环点击的元素的下标与当前元素的下标一致的时，数组添加元素
      var elemBtn = $('.lotNumberBox').eq(index).find('.lotinnerbox>.innerBox>div>button');
      elemBtn.removeClass('colorBg');
        // 判断下注的数目 start
            elemBtn.click(function(){
                  if($(this).hasClass('colorBg')){
                    btnVal = $(this).val();
                    idArray.push(btnVal);
                    console.log(idArray)
                  }else{
                    idArray.pop($(this).val());
                  }
                // 判断下注的数目 end
            if($(this).hasClass('colorBg')){
               valNum = Number(valNum) + Number(1);
               var moneys = valNum*2;
              $('#bet_sel_count').html(valNum);
              $('#bet_sel_money').html(moneys);
              return false;             
            }else{
              valNum --;
              var moneys = valNum*2;
              $('#bet_sel_count').html(valNum); 
              $('#bet_sel_money').html(moneys);
              return false;
            }
         })
    })
  return false;
})
// 弹窗的减法
function reduceM(){
  var beishu  = $('#beishu').val();
  if(beishu<=1){
    beishu = 1;
    return false;
  }else{
    beishu --;
    $('#beishu').val(beishu);
    var reduceVal = $('#beishu').val();
    var bet_sel_countVal = $('#bet_sel_count').html();
    if($('.checked2222').prop('id')==0){
      var AreduceMoney = bet_sel_countVal*1*2*reduceVal;
      $('#bet_sel_money').html(AreduceMoney);
    }else if($('.checked2222').prop('id')==1){
       var AreduceMoney = bet_sel_countVal*0.1*2*reduceVal;
      $('#bet_sel_money').html(AreduceMoney);     
    }else{
      var AreduceMoney = bet_sel_countVal*0.01*2*reduceVal;
      $('#bet_sel_money').html(AreduceMoney);      
    }
    return false;
  }
}
// 弹窗的加法
function addM(){
  var beishu  = $('#beishu').val();
    beishu = Number(beishu)+ Number(1);
        var bet_sel_countVal = $('#bet_sel_count').html();
    $('#beishu').val(beishu);    
    if($('.checked2222').prop('id')==0){
      var AreduceMoney = bet_sel_countVal*1*2*beishu;
      $('#bet_sel_money').html(AreduceMoney);      
    }else if($('.checked2222').prop('id')==1){
       var AreduceMoney = bet_sel_countVal*0.1*2*beishu;
       AreduceMoney = AreduceMoney.toFixed(2)
      $('#bet_sel_money').html(AreduceMoney);     
    }else{
      var AreduceMoney = bet_sel_countVal*0.01*2*beishu;
      AreduceMoney = AreduceMoney.toFixed(2)
      $('#bet_sel_money').html(AreduceMoney);      
    }
    return false;
}

//元角分的切换
$('.zhuMon').click(function(){
    var overjs  = $('#bet_sel_count').html();
    var beishu  = $('#beishu').val();
        $(this).addClass('checked2222').siblings().removeClass('checked2222');
        if($(this).prop('id')==0){
          var Yjs = overjs*1*2*beishu;
          console.log(Yjs)
          $('#bet_sel_money').html(Yjs)
        }else if($(this).prop('id')==1){
          var Jjs = overjs*0.1*2*beishu;
          Jjs = Jjs.toFixed(2);
          $('#bet_sel_money').html(Jjs);
        }else{
          var Fjs = overjs*0.01*2*beishu;
          Fjs = Fjs.toFixed(2);
          console.log(Fjs)
          $('#bet_sel_money').html(Fjs);          
        }
      })
$(".btn").click(function(){
    var uid = <?php echo json_encode($this->user['uid']);?>;
    if(uid == null){
      alert('你还没进行登录,不能进行下注');
      window.location.href = '/index.php/user/login'
      return false;
    }
    if(!$('.lot-number-right>div>button').hasClass('colorBg')){
      $('#ui-wxts').show();
      return false;
    }else{
      $('#ui-computed').show();
      
      return false;
    }

})
//清空
function clearCode(){
  // $(".specific-cell-o>.code").removeClass("checked");
  // $("#bet_sel_count").text("0");
  // $("#bet_sel_money").text("0.0");
  // gameActionRemoveCode();
  window.reload();
}
function closebtn(obj){
  $(obj).parent().parent().parent('.ui-dialog').hide();
}
//调起数据发送接口
function sendTouzhu(){
  //var selectCode = gameActionAddCode();
  //if(selectCode!=false){
    var uid = <?php echo json_encode($this->user['uid']);?>;
    if(uid == null){
      alert('你还没进行登录,不能进行下注');
      window.location.href="/index.php/user/login";
      return false;
    }
    $("#touzhuBox").show();
  if($("#bet_sel_count").text()=="0" && $("#textarea-code").size()<1){
    winjinAlert("请选择投注号码","alert");
    return false;
  }
  
  //单式投注
  if($("#textarea-code").size()>0 && $("#textarea-code").val()==""){
    winjinAlert("请输入投注号码","alert");
    return false;
  }
  //alert(typeof($(".game-main .game-cont .num-table .pp").attr("lenght")));
  
    $('#touzhuBox').dialog({
      title:'注单设定',
      resizable: false,
      width:300,
      minHeight:220,
      modal: true,
      buttons: {
      "确定": function() {
        $( this ).dialog( "close" );
        gameActionAddCode();
        $("#btnPostBet").click();
        
      },
      "取消": function() {
        $( this ).dialog( "close" );
      }
      }
    });//dialog end
  
  //}
}

$('.btnSure').click(function(){
    var qishu = $("#qishu").text();
    var money = $('#bet_sel_money').html();
    var fenL = $('.checked2222').prop('id');
    var beishu = $('#beishu').val();
    /*$.post('/index.php/index/orders',{qishu:qishu,money:money},function(msg){
        console.log(msg.code);
        console.log( eval("(" + msg.code + ")"));
      });*/
      var htArray = idArray;
      console.log(htArray);
   $.ajax({
      url:'/index.php/index/orders',
      data:{qishu:qishu,money:money,htarray:htArray,fenl:fenL,beishu:beishu},
      type:'post',
      dateType:'json',
      success:function(msg){
        /*alert(msg);*/
        /*var msgs = JSON.parse(msg);
        if(msgs.code == 201){
           alert(msgs.infos);
        }else{
           alert(msgs.info);
        }*/
            switch(msg)
            {
            case '201':
              alert("金额不足");
              break;
            case '200':
              alert("下注成功");
              window.location.href="/index.php/index/ssc";
              break; 
            case '203':
              alert("下注失败");
              break;     
            default:
              1;
            }
      }
   }); 
})
$('.boxUl>li').each(function(i){
  $(this).click(function(){
    $(this).find('button').addClass('colorBg').parent().siblings().find('button').removeClass('colorBg');
    var InpVal = $(this).find('button').html();
    $('.chose_f').html(InpVal);
    $('.gp1').html(InpVal);
    var index = $(this).index();
    $('.lotNumberBox').eq(index).show().siblings().hide();
    var xxts = $('.innerBox').eq(index).find('div').find('.colorBg').html();
    $('.One_choose').html(xxts);
  })
})
$('.innerBox>div>button').each(function(i){
  $(this).click(function(){
    if($(this).hasClass('colorBg')){
      $(this).removeClass('colorBg');
    }else{
      $(this).addClass('colorBg');
    }
    var inpTxt = $(this).html();
    $('.One_choose').html(inpTxt);
  })
})

//直选的全大小奇偶清的所有功能 start
//全
$('.chosediv1').each(function(i){

  var valNum = $('#bet_sel_money').html();

  $('#bet_sel_count').html(0);
  $('#bet_sel_money').html(0);

  $('.chosediv1').click(function(){
  $(this).siblings().find('span').removeClass('colorBg');
  $(this).parent().siblings().find('button').removeClass('colorBg');

  if($(this).find('span').hasClass('colorBg')){
    $(this).find('span').removeClass('colorBg');
    $(this).parent().siblings().find('button').removeClass('colorBg');
  }else{
    $(this).find('span').addClass('colorBg'); 
    $(this).parent().siblings().find('button').addClass('colorBg');
  }

//将计算结果传到底部
  if($(this).find('span').hasClass('colorBg')){

    valNum = Number(valNum) + Number(10);
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);
  }else{
    
    if(valNum <= 0){
      valNum = 0;
    }else{
      valNum = Number(valNum) - Number(10);
    }
    console.log(valNum)
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);    
  }

})
})

// 大
$('.chosediv2').each(function(i){
  var valNum = $('#bet_sel_money').html();
$('.chosediv2').click(function(){
  $(this).siblings().find('span').removeClass('colorBg');
  $(this).parent().siblings().find('button').removeClass('colorBg');
  $('#bet_sel_count').html(0);
  $('#bet_sel_money').html(0);
  if($(this).find('span').hasClass('colorBg')){
    $(this).find('span').removeClass('colorBg');
     
  }else{
    $(this).find('span').addClass('colorBg');  
    $(this).parent().siblings().find('button').each(function(i){
      if(i>4){
        var k = i;
        $(this).parent().parent().find('button').eq(k).addClass('colorBg')
      }
    })
    
  }
    // console.log($('.chosediv1').find('.colorBg').size());
//将计算结果传到底部
  if($(this).find('span').hasClass('colorBg')){

    valNum = Number(valNum) + Number(5);
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);
  }else{
    
    if(valNum <= 0){
      valNum = 0;
    }else{
      valNum = Number(valNum) - Number(5);
    }
    console.log(valNum)
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);    
  }
})
})
//小
$('.chosediv3').each(function(i){
  var valNum = $('#bet_sel_money').html();
$('.chosediv3').click(function(){
  $(this).siblings().find('span').removeClass('colorBg');
  $(this).parent().siblings().find('button').removeClass('colorBg');
  $('#bet_sel_count').html(0);
  $('#bet_sel_money').html(0);
  if($(this).find('span').hasClass('colorBg')){
    $(this).find('span').removeClass('colorBg');
     
  }else{
    $(this).find('span').addClass('colorBg');  
    $(this).parent().siblings().find('button').each(function(i){
      if(i<=4){
        var k = i;
        $(this).parent().parent().find('button').eq(k).addClass('colorBg')
      }
    })
    
  }
  //将计算结果传到底部
  if($(this).find('span').hasClass('colorBg')){

    valNum = Number(valNum) + Number(5);
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);
  }else{
    
    if(valNum <= 0){
      valNum = 0;
    }else{
      valNum = Number(valNum) - Number(5);
    }
    console.log(valNum)
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);    
  }
})
})
//奇数
$('.chosediv4').each(function(i){
  var valNum = $('#bet_sel_money').html();
$('.chosediv4').click(function(){
  $(this).siblings().find('span').removeClass('colorBg');
  $('#bet_sel_count').html(0);
  $('#bet_sel_money').html(0);
  $(this).parent().siblings().find('button').removeClass('colorBg');
  if($(this).find('span').hasClass('colorBg')){
    $(this).find('span').removeClass('colorBg');
     
  }else{
    $(this).find('span').addClass('colorBg');  
    $(this).parent().siblings().find('button').each(function(i){
      if(i%2==1){
        var k = i;
        $(this).parent().parent().find('button').eq(k).addClass('colorBg')
      }
    })
    
  }
  //将计算结果传到底部
  if($(this).find('span').hasClass('colorBg')){

    valNum = Number(valNum) + Number(5);
    var Dmoneys = valNum*2;  
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);
  }else{
    
    if(valNum <= 0){
      valNum = 0;
    }else{
      valNum = Number(valNum) - Number(5);
    }
    console.log(valNum)
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);    
  }
})
})
//偶数
$('.chosediv5').each(function(i){
  var valNum = $('#bet_sel_money').html();
$('.chosediv5').click(function(){
  $(this).siblings().find('span').removeClass('colorBg');
  $('#bet_sel_count').html(0);
  $('#bet_sel_money').html(0);
  $(this).parent().siblings().find('button').removeClass('colorBg');
  if($(this).find('span').hasClass('colorBg')){
    $(this).find('span').removeClass('colorBg');
     
  }else{
    $(this).find('span').addClass('colorBg');  
    $(this).parent().siblings().find('button').each(function(i){
      if(i%2==0){
        var k = i;
        $(this).parent().parent().find('button').eq(k).addClass('colorBg')
      }
    })
    
  }
    //将计算结果传到底部
  if($(this).find('span').hasClass('colorBg')){

    valNum = Number(valNum) + Number(5);
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);
  }else{
    
    if(valNum <= 0){
      valNum = 0;
    }else{
      valNum = Number(valNum) - Number(5);
    }
    console.log(valNum)
    var Dmoneys = valNum*2;
    $('#bet_sel_count').html(valNum);
    $('#bet_sel_money').html(Dmoneys);    
  }
})
})
//清
$('.chosediv6').click(function(){
  $(this).siblings().find('span').removeClass('colorBg');
  $(this).parent().siblings().find('button').removeClass('colorBg'); 

    $(this).find('span').addClass('colorBg'); 
    $(this).parent().siblings().find('button').removeClass('colorBg');
    $('#bet_sel_count').html(0);
    $('#bet_sel_money').html(0);
})
//直选的全大小奇偶清的所有功能 end
</script>
